﻿@model ProductDetailsModel.ProductBreadcrumbModel
@using Nop.Core.Domain.Common;
@using Nop.Core.Infrastructure;
@using Nop.Web.Models.Catalog;
@{
    var breadcrumbDelimiter = EngineContext.Current.Resolve<CommonSettings>().BreadcrumbDelimiter;
}
@if (Model.Enabled)
{
    <div class="breadcrumb">
        <ul>
            @Html.Widget("productbreadcrumb_before", Model.ProductId)
            <li>
                <span itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
                    <a href="@Url.RouteUrl("HomePage")" itemprop="url">
                        <span itemprop="title">@T("Products.Breadcrumb.Top")</span>
                    </a>
                </span>
                <span class="delimiter">@breadcrumbDelimiter</span>
            </li>
            @foreach (var category in Model.CategoryBreadcrumb)
            {
                <li>
                    <span itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
                        <a href="@Url.RouteUrl("Category", new { SeName = category.SeName })" itemprop="url">
                            <span itemprop="title">@category.Name</span>
                        </a>
                    </span>
                    <span class="delimiter">@breadcrumbDelimiter</span>
                </li>
            }
            <li>
                <strong class="current-item">@Model.ProductName</strong>
                @*<strong class="current-item"><a href="@Url.RouteUrl("Product", new { SeName = Model.ProductSeName })" itemprop="url">@Model.ProductName</a></strong>*@
                @Html.Widget("productbreadcrumb_after", Model.ProductId)
            </li>
        </ul>
    </div>

}